<?php

class Char
{

    protected $pos = 0;
    static protected $ref_stream = null;

    function isEOF()
    {
        return !$this->getRef();
    }

    function setStream(&$ref)
    {
        $this->ref_stream =& $ref;
    }

    function &getRef()
    {
        return $this->ref_stream->getCharRef($this->pos);
    }

}
?>